<template>
  <div class="navigation-bar">
    <div class="nav-item" :class="{ active: activeTab === 'overview' }" @click="setActiveTab('overview')">
      实时监测
    </div>
    <div class="nav-item" :class="{ active: activeTab === 'statistics' }" @click="setActiveTab('statistics')">
      统计分析
    </div>
    <div class="nav-item" :class="{ active: activeTab === 'alerts' }" @click="setActiveTab('alerts')">
      告警
    </div>
    <div class="nav-item" :class="{ active: activeTab === 'reports' }" @click="setActiveTab('reports')">
      统计报告
    </div>
    <div class="nav-item" :class="{ active: activeTab === 'activity' }" @click="setActiveTab('activity')">
      共享活力
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const activeTab = ref('alerts') // 默认选中告警

const setActiveTab = (tab: string) => {
  activeTab.value = tab
}
</script>

<style scoped lang="less">
.navigation-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
  background: linear-gradient(90deg, rgba(0, 30, 60, 0.8) 0%, rgba(0, 50, 100, 0.9) 50%, rgba(0, 30, 60, 0.8) 100%);
  border-radius: 30px;
  margin: 20px 0;
  padding: 0 20px;
  box-shadow: 0 4px 20px rgba(0, 100, 200, 0.3);
  border: 1px solid rgba(0, 150, 255, 0.3);
}

.nav-item {
  padding: 8px 24px;
  margin: 0 8px;
  border-radius: 20px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  
  &:hover {
    background: rgba(0, 150, 255, 0.2);
    border-color: rgba(0, 150, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 150, 255, 0.3);
  }
  
  &.active {
    background: linear-gradient(135deg, #00aaff 0%, #0088cc 100%);
    border-color: #00aaff;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.4);
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
      pointer-events: none;
    }
  }
}
</style>